package com.imooc;

import java.util.Collections;

import static java.util.Arrays.sort;

class Solution {
    public String largestNumber(int[] nums) {
        Integer[] nums1 = new Integer[0];
        Integer[] nums2 = new Integer[0];
        for (int i = 0; i < nums.length; i++) {
            if (i < 10) {
                nums1[i] = i;
            } else {
                nums2[i] = i;
            }
        }
        sort(nums1, Collections.reverseOrder());
        sort(nums2, Collections.reverseOrder());
        int[] arr = new int[nums1.length + nums2.length];
        String s = "";
        for (int i = 0; i < arr.length; i++) {
            s = s + arr[i];//拼接成字符串，最终放在变量s中
        }
        return s;
    }
}